package com.iw.adoms.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.iw.core.orm.hibernate.BaseEntity;

@Entity
@Table(name = "msg_notice")
public class MsgNotice extends BaseEntity {

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "department_id")
	private Department department; // 所属部门
	private String title; // 标题
	private String context; // 主要内容
	private String memo; // 备注
	private String userName; // 消息发送人

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "to_department_id")
	private Department toDepartment; // 所属部门

	private String narea;// 消息范围

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "type_id")
	private MsgNoticeType type; // 消息类型

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public MsgNoticeType getType() {
		return type;
	}

	public void setType(MsgNoticeType type) {
		this.type = type;
	}

	public String getNarea() {
		return narea;
	}

	public void setNarea(String narea) {
		this.narea = narea;
	}

	public Department getToDepartment() {
		return toDepartment;
	}

	public void setToDepartment(Department toDepartment) {
		this.toDepartment = toDepartment;
	}

}